package cn.stylefeng.guns.modular.time.model.request;

import cn.stylefeng.roses.kernel.rule.annotation.ChineseDescription;
import lombok.Data;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;

/**
 * 文件传输任务请求模型
 *
 * 用于接收创建、编辑、删除与分页查询的请求参数。
 */
@Data
public class FileTransfersRequest {

    @ChineseDescription("传输任务id")
    @NotNull(message = "传输任务ID不能为空", groups = {edit.class, delete.class, detail.class})
    private Long transferId;

    @ChineseDescription("文件名及目录")
    @NotBlank(message = "文件路径不能为空", groups = {add.class, edit.class})
    private String filePath;

    @ChineseDescription("croc 生成的 code 值")
    @NotBlank(message = "code 值不能为空", groups = {add.class, edit.class})
    private String code;

    @ChineseDescription("内网IP地址")
    @NotBlank(message = "内网IP不能为空", groups = {add.class, edit.class})
    private String intranetIp;

    @ChineseDescription("搜索关键字")
    private String searchText;

    @ChineseDescription("页码")
    private Integer pageNo = 1;

    @ChineseDescription("每页条数")
    private Integer pageSize = 20;

    @ChineseDescription("排序字段")
    private String sortField;

    @ChineseDescription("排序方式")
    private String sortOrder;

    /** 添加参数校验分组 */
    public @interface add {}

    /** 编辑参数校验分组 */
    public @interface edit {}

    /** 删除参数校验分组 */
    public @interface delete {}

    /** 详情参数校验分组 */
    public @interface detail {}
}